package com.sunagy.demand.front.utils;

import java.util.Random;

/**
 * desc：#TODO fill me ！
 * author：三餘無夢生
 * date：2018/4/27
 * time：下午2:50
 */
public class UUIDUtil {
    public UUIDUtil() {
    }

    public static String createUUid(int length) {
        Random rm = new Random();
        double random = (1.0D + rm.nextDouble()) * Math.pow(10.0D, (double)length);
        String lengthString = String.valueOf(random);
        int prefix = (int)(1.0D + Math.random() * 9.0D);
        int suffix = (int)(0.0D + Math.random() * 10.0D);
        lengthString = prefix + lengthString.substring(2, length) + suffix;
        return lengthString;
    }
}
